home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
utils
/
gemfsc15.lzh
/
AESSRC14.LZH
/
AESUTOB5.S
< prev
next >
Wrap
Text File
|
1990-05-27
|
2KB
|
55 lines
;*========================================================================
;*
;* AESFAST Public Domain GEM bindings.
;*
;* Maintenance:
;* 05/26/90 - v1.4: This module is new with this release.
;*========================================================================
;*************************************************************************
;*
;* AESUTOB5.S - Object-related utilities 5 of n.
;* Non-standard utility functions.
;*
;*************************************************************************
.include "gemfast.sh" ; Pull in header file.
;-------------------------------------------------------------------------
; obj_xtfind - Return index of object with specified extended object type.
;
; int obj_rbfind(tree, parentobj, state);
;
;|v1.4: This routine is new with this release.
;-------------------------------------------------------------------------
_obj_xtfind::
cargs #4,.ptree.l,.parent.w,.xtype.w
exg a1,d3 ; save d3 in a1
move.l .ptree(sp),a0
move.w .xtype(sp),d2
move.w .parent(sp),d3
move.w d3,d0
muls #OBJ_SIZ,d0
move.w ob_head(a0,d0.l),d0
ble.s .notfound
.loop:
move.w d0,d1
muls #OBJ_SIZ,d1
cmp.b ob_type(a0,d1.l),d2
beq.s .done
move.w ob_next(a0,d1.l),d0
cmp.w d0,d3
bne.s .loop
.notfound:
moveq.l #-1,d0
.done:
exg a1,d3 ; restore d3 from a1
tst.w d0 ; insure CCR return matches d0
rts